package tech.aistar.filter;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class PathListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        ServletContext application = sce.getServletContext();
        String contextPath = application.getContextPath();
        application.setAttribute("path",contextPath);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
